package com.istock.state.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.istock.base.common.api.model.ApiBaseResponse;
import com.istock.base.common.api.model.RetStatusEnum;
import com.istock.state.demo.model.OrderInfo;
import com.istock.state.demo.service.OrderInfoService;

@Controller
public class QueryController {

	@Autowired
	private OrderInfoService orderInfoService;
	
	@RequestMapping("findOrderInfoById")
	@ResponseBody
	public ApiBaseResponse<OrderInfo> findOrderInfoById(Long orderId){
		OrderInfo orderInfo = orderInfoService.findOrderInfoById(orderId);
		return new ApiBaseResponse<OrderInfo>(RetStatusEnum.SUCCESS , "S","查询成功" ,orderInfo);
	}
}
